﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Masterpages
{
    public delegate void MenuInit();

    public partial class Firstmaster : System.Web.UI.MasterPage
    {
        public string link { get; set; }
        public string linkvalue { get; set; }

        Dictionary<ListItem, int> dictionary = new Dictionary<ListItem, int>();

        public event MenuInit MenuInitEvent;
        


        protected void Page_Load(object sender, EventArgs e)
        {
            internalHyperLink.NavigateUrl = link;
            internalHyperLink.Text = linkvalue;

            if (!Page.IsPostBack) { 
                if (MenuInitEvent != null)
                {
                    MenuInitEvent();
                }
            }
        }

        public void AddLink(string t, string v)
        {
            uiMenu.Items.Add(new ListItem(t, v));
        }

    }
}